// child是排序的！
// 见GameChar.RingLayer
const zorderkey = 'zorder';
class ZLayer extends egret.DisplayObjectContainer {
	addChildZ(obj: egret.DisplayObject, z: number): void {
		obj[zorderkey] = z;
		this.addChild(obj);
		this.$children.sort((d1, d2) => (d1[zorderkey] || 0) - (d2[zorderkey] || 0));
	}
}
